#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main(int agrc, char ** agrv){

  string ss;
  vector<string>v;

  while(cin >> ss){
    v.push_back(ss);
  }
  int len = v.size();
  for (int i = 1; i <= len; i++){
    cout << v[len-i] + " ";
  }

  return 0;
}